<div class="donvis view">
<h2><?php  __('Đơn vị');?></h2>
	<table class="table table-striped" style="width:70%">
		<tr>
			<td style="width:30%;font-weight:bold"><?php __('Mã đơn vị'); ?></td>
			<td><?php echo $donvi['Donvi']['dv_maso']; ?>&nbsp;</td>
		</tr>
		<tr>
			<td style="width:30%;font-weight:bold"><?php __('Tên đơn vị'); ?></td>
			<td><?php echo $donvi['Donvi']['dv_ten']; ?>&nbsp;</td>
		</tr>
		<tr>
			<td style="width:30%;font-weight:bold"><?php __('Ghi chú'); ?></td>
			<td><?php echo $donvi['Donvi']['ghichu']; ?>&nbsp;</td>
		</tr>
</table>
</div>
<div class="actions">
	<h3><?php __('Cập nhật'); ?></h3>
	<ul>
		<li><?php echo $this->Html->link(__('Sửa đơn vị', true), array('action' => 'edit', $donvi['Donvi']['id'])); ?> </li>
		<li><?php echo $this->Html->link(__('Xóa đơn vị', true), array('action' => 'delete', $donvi['Donvi']['id']), null, sprintf(__('Có chắc bạn muốn xóa đơn vị # %s?', true), $donvi['Donvi']['id'])); ?> </li>
		<li><?php echo $this->Html->link(__('Danh sách đơn vị', true), array('action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('Thêm đơn vị', true), array('action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('Danh sách trường', true), array('controller' => 'truongs', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('Thêm trường', true), array('controller' => 'truongs', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('Danh sách bộ môn', true), array('controller' => 'bomons', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('Thêm bộ môn', true), array('controller' => 'bomons', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('Danh sách kế hoạch', true), array('controller' => 'kehoaches', 'action' => 'index')); ?> </li>
	</ul>
</div>
<div class="related">
	<h3><?php __('Các bộ môn trực thuộc đơn vị');?></h3>
	<?php if (!empty($donvi['Bomon'])):?>
	<table class="table table-consended table-bordered table-hover">
	<tr class="info">
		<th><?php __('STT'); ?></th>
		<th><?php __('Mã bộ môn'); ?></th>
		<th><?php __('Tên bộ môn'); ?></th>
		<th><?php __('Ghi chú'); ?></th>
		<th class="actions"><?php __('Actions');?></th>
	</tr>
	<?php
		$i = 0;
		$stt = 0;
		foreach ($donvi['Bomon'] as $bomon):
			$class = null;
			if ($i++ % 2 == 0) {
				$class = ' class="altrow"';
			}
		?>
		<tr<?php echo $class;?>>
			<td align="right"><?php echo ++$stt; ?></td>
			<td align="center"><?php echo $bomon['bomon_maso'];?></td>
			<td><?php echo $bomon['bm_ten'];?></td>
			<td><?php echo $bomon['ghichu'];?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('Xem', true), array('controller' => 'bomons', 'action' => 'view', $bomon['id'])); ?>
				<?php echo $this->Html->link(__('Sửa', true), array('controller' => 'bomons', 'action' => 'edit', $bomon['id'])); ?>
				<?php echo $this->Html->link(__('Xóa', true), array('controller' => 'bomons', 'action' => 'delete', $bomon['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $bomon['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $this->Html->link(__('Thêm bộ môn', true), array('controller' => 'bomons', 'action' => 'add'));?> </li>
		</ul>
	</div>
</div>

